<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>报告邮件</title>
</head>
<body>
<style type="text/css"> body {
    background: #ffffff;
    margin: 0 auto;
    padding: 0;
    text-align: left;
    font-size: 12px;
    font-family: "微软雅黑", "宋体";
}

table {
    font-size: 12px;
    font-family: "微软雅黑", "宋体";
}

.fail {
    color: firebrick;
}

.pass {
    color: green;
}

.table_c {
    border: 1px solid #ccc;
    border-collapse: collapse;
}

.table_c td {
    border: 1px solid #ccc;
    border-collapse: collapse;
}

.table_b {
    border: 1px solid #666;
    border-collapse: collapse;
}

.table_b td {
    border-collapse: collapse;
    border: 1px solid #ccc;
}

.table_b th {
    color: #fff;
    background: #666;
}

a:link {
    color: #3366cc;
    font-weight: normal;
}

a:visited {
    color: #3366cc;
}

a:hover {
    color: #000;
}

a:active {
    color: #3366cc;
}

td {
    line-height: 20px;
} </style>

<table width="650" border="0" cellspacing="0" align="center" cellpadding="0" style="border: #ccc 1px solid;">
    <tbody>
    <tr>
        <td>
            <table width="650" align="center" border="0" cellpadding="0" cellspacing="0" bgcolor="fbfbfb"
                   style="border-bottom: #eeeeee 1px solid;border-top: #cc0000 1px solid;">
                <tbody>
                <tr>
                    <td><img
                            src="https://sngedu-punch-1251502357.cos.ap-guangzhou.myqcloud.com/agency_picurl/QFzQYCgCrxmbUicdTdNiaQSXQIDlBjFAtNjPLeewLJRVDc5NWp4mlicdXsBW5zrr8Fh"
                            width="80" height="80">
                    </td>
                    <td>
                        <h1 style="color:#409EFF;" th:text="|${company}自动化测试报告|">Testing自动化测试平台报告</h1>
                        <span style="font-size: 14px; color:#999999">
                        此信为自动化测试邮件，请不要直接回复。
                    </span>
                    </td>
                </tr>
                </tbody>
            </table>
            <table width="600" border="0" align="center" cellspacing="0" cellpadding="0"
                   style="margin: 28px 28px 10px 28px;">
                <tbody>
                <tr>
                    <td style="font-size: 16px; color: black; font-weight:bold; padding-bottom:15px;">
                        您好，本测试邮件来自：
                        <span th:text="${nickname}" style="color: coral">
                            Roy
                        </span>
                    </td>
                </tr>
                </tbody>
            </table>
            <table width="600" border="0" cellspacing="0" cellpadding="0" align="center">
                <tbody>
                <tr>
                    <td style="font-size: 14px; color:#409EFF; font-weight:bold; padding-bottom:15px;"
                        th:text="|【${projectName}】的第${buildOrder}次运行结果更汇总结果如下：|">
                        测试项目汇总结果如下：
                    </td>
                </tr>
                <tr>
                    <td>
                        <table width="600" border="0" align="center" class="table_c" style=
                                "border-collapse:collapse;">
                            <tbody>
                            <tr>
                                <td width="100" height="28" align="center" bgcolor="  #fdf6ec" style=
                                        "border:1px solid#ccc;">测试状态
                                </td>
                                <td width="100" height="28" align="center" bgcolor=
                                        "  #fdf6ec" style=
                                            "border:1px solid#ccc;">通过率
                                </td>
                                <td width="120" height="28" align="center" bgcolor=
                                        "  #fdf6ec" style=
                                            "border:1px solid#ccc;">开始时间
                                </td>
                                <td width="120" height="28" align="center" bgcolor=
                                        "  #fdf6ec" style=
                                            "border:1px solid#ccc;">结束时间
                                </td>
                            </tr>
                            <tr>
                                <td th:class="${#strings.equals(status,'Pass')} ? 'pass':'fail'" height="28" bgcolor="#FFFFFF" align=
                                        "center" style=
                                            "border:1px solid#ccc;" th:text="${status}">status
                                </td>
                                <td height="28" bgcolor="#FFFFFF" align=
                                        "center" style=
                                            "border:1px solid#ccc;" th:text="${passRate}">passRate
                                </td>
                                <td height="28" bgcolor="#FFFFFF" align=
                                        "center" style=
                                            "border:1px solid#ccc;"
                                    th:text="${#temporals.format(result.executeTime,'yyyy-MM-dd HH:mm:ss')}">startTime
                                </td>
                                <td height="28" bgcolor="#FFFFFF" align=
                                        "center" style=
                                            "border:1px solid#ccc;"
                                    th:text="${#temporals.format(result.finishTime,'yyyy-MM-dd HH:mm:ss')}">endTime
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td style="font-size: 14px; color:#409EFF; font-weight:bold; padding-bottom:15px;"><br>测试详情报表
                    </td>
                </tr>
                <tr>
                    <td>
                        <table width="600" border="0" align=
                                "center" class="table_c" style=
                                       "border-collapse:collapse;">
                            <tbody>
                            <tr>
                                <td width="100" height="28" align="center" bgcolor=
                                        " #fdf6ec" style=
                                            "border:1px solid#ccc;">用例信息
                                </td>
                                <td width="100" height="28" align="center" bgcolor=
                                        " #fdf6ec" style=
                                            "border:1px solid#ccc;">用例通过数/总数
                                </td>
                                <td width="120" height="28" align="center" bgcolor=
                                        " #fdf6ec" style=
                                            "border:1px solid#ccc;">状态
                                </td>
                            </tr>
                            <tr th:each="resultDetail:${resultDetails}">
                                <td height="28" bgcolor="#FFFFFF" align=
                                        "center" style=
                                            "border:1px solid#ccc;"
                                    th:text="${resultDetail.moduleName} +'->'+ ${resultDetail.caseName}"></td>
                                <td height="28" bgcolor="#FFFFFF" align=
                                        "center" style=
                                            "border:1px solid#ccc;" th:text="${resultDetail.detail}"></td>
                                <td height="28"
                                    th:class="${#strings.equals(resultDetail.status, 'PASS')} ? 'pass':'fail'"
                                    bgcolor="#FFFFFF" align=
                                            "center" style=
                                            "border:1px solid#ccc;" th:text="${resultDetail.status}"></td>
                            </tr>

                            </tbody>
                        </table>
                    </td>
                </tr>
                </tbody>
            </table>
        </td>
    </tr>
    </tbody>
</table>
</body>
</html>